#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using i128 = __int128;
const int N = 1e6 + 5;

bool check(string s) {
    int l = 0, r = s.size() - 1;
    while (l <= r) {
        if (s[l] != s[r]) return false;
        l++;
        r--;
    }
    return true;
}

void solve() {
    int n;
    string s;
    cin >> n >> s;
    if (check(s)) {
        cout << 0 << endl;
        return;
    }
    vector<int> res;
    for (int i = 0; i < n; i++) {
        if (s[i] == '0') res.push_back(i + 1);
    }
    cout << res.size() << endl;
    for (int i = 0; i < res.size(); i++) {
        if (i) cout << " ";
        cout << res[i];
    }
    cout << endl;
    return;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int t;
    cin >> t;
    while (t--) solve();

    return 0;
}